Skip to content

fix(wireguard): emit UTC log timestamps#47

Open
Rerowros wants to merge 2 commits into
PasarGuard:devfrom
Rerowros:fix/wireguard-utc-timestamps
Open

fix(wireguard): emit UTC log timestamps#47
Rerowros wants to merge 2 commits into
PasarGuard:devfrom
Rerowros:fix/wireguard-utc-timestamps

Conversation

@Rerowros
Copy link
Copy Markdown

@Rerowros Rerowros commented May 10, 2026

Summary

This pull request changes WireGuard log timestamps to use UTC while keeping the project's standard Go log timestamp format.

The previous WireGuard log timestamp used local time. Keeping the existing YYYY/MM/DD HH:mm:ss log format avoids a second timestamp style in the logging system, while using UTC makes log ordering clearer across hosts and timezones.

WireGuard Logging

  • Changed WireGuard log timestamp generation to use time.Now().UTC() in backend/wireguard/log.go.
  • Kept the standard log-style timestamp format used by the rest of the project.
  • Updated the lifecycle test expectation to match the UTC log timestamp format in backend/wireguard/wireguard_lifecycle_test.go.

Why This Is Better

Node logs are often compared with panel-side events when debugging traffic accounting, sync behavior, or node restarts. Local timestamps make that comparison ambiguous when services run in different timezones.

Using UTC while preserving the existing log format avoids dual log styles and keeps ordering clear across machines, containers, and log collectors.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ff8ff002-7274-465e-9abd-df407c956f78

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@M03ED
Copy link
Copy Markdown
Contributor

M03ED commented May 11, 2026

the utc method call is correct but the format have changed incorrectly, format you refer is RFC 3339 and is used for api response
all of go standard log use this format by default and it used all over the code

2026/05/11 08:44:51

this change will cause dual behavior in logging system

@Rerowros
Copy link
Copy Markdown
Author

Rerowros commented May 11, 2026

I updated the PR to keep time.Now().UTC() but restored the standard Go log timestamp format (YYYY/MM/DD HH:mm:ss)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants